<?
	$this->panelpath=$this->rootDir.'/'.$path;
	$this->hostpanelpath=root.'/'.$path;

	# подключаем визуальный редактор

	if (strstr($this->path,'admin')) $this->paneltab[3]=' tabselected';
	elseif ($this->viewmode=='edit') {
		$this->paneltab[2]=' tabselected';
		$this->paneleditbuttons=true;
	}
	else $this->paneltab[1]=' tabselected';
	
	
	if ($this->viewmode=='edit' && !strstr($this->path,'admin')) {
		$this->Script('jquery');
		$this->Script('extjs');
		$this->Script('miframe');
		$this->Script('tiny_mce/tiny_mce_src');
		$this->Script('exttinymce');?>
<script type="text/javascript">panelpath="<?=$this->panelpath.'/';?>"; pagepath="<?=$this->file;?>"; templatefolder="<?=substr($this->getTemplatePath(),strlen(hostRoot))?>"; templatepath="<?=substr($this->getTemplatePath(),strlen(root)).$this->template;?>";</script>
<script type="text/javascript" src="<?=$this->panelpath;?>/template/script.js"></script>

<style type="text/css">@import url('<?=$this->engineDir;?>js/extjs/css/ext-all.css');</style>
<style type="text/css">@import url('<?=$this->engineDir;?>js/extjs/css/xtheme-gray.css');</style>
	<? }
	
	include_once $this->hostpanelpath.'/template/index.php';
?>